package com.youbest.cloud.javacore.array;

import java.util.Arrays;

public class ArrayDemo {

	public static void main(String[] args) {
		test3();
	}

	private static void test3() {
		int[] a = {1,2,3,4,5};
		int[] b = Arrays.copyOf(a,a.length);
		int[] c = a;
		b[3] = 333;
		c[3] = 123;
		System.out.println(Arrays.toString(a));
		System.out.println(Arrays.toString(b));
		System.out.println(Arrays.toString(c));
	}

	private static void test2() {
		String[][] arr = {
				{"2","1","3","4","3","87",},
				{"2","555","1","4","3"},
				{"2","444","1","4"},
				{"2","11","0","4","1","843"},
				{"2","33","3","4","2","823"},
				{"2","1","22","11","4","81"}
		};
		
		String s = Arrays.deepToString(arr);
		System.out.println(s);
	}

	private static void test1() {
		String[] arr = {"3","33","4","1","2","22","656","54","3","1","2"};
		Arrays.sort(arr);
		String s = Arrays.toString(arr);
		System.out.println(s);
	}
}
